<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE html>
<html>
<head>
<title>代理说明管理</title>
<link rel="stylesheet" href="/bootstrap/css/bootstrap.min.css" />
<script type="text/javascript" src="/js/jq.js"></script>
<script type="text/javascript" src="/js/global.js"></script>
 <script type="text/javascript" src="/js/bootstrap-switch.min.js"></script>
<script type="text/javascript" src="/bootstrap/js/bootstrap.min.js"></script>
<link rel="stylesheet" href="/css/bootstrap-switch.min.css" />
<link rel="stylesheet" href="/css/jquery.dataTables.min.css" />
<script type="text/javascript"  src="/js/jquery.dataTables.min.js"></script>
<style>
	.btn-editBaiMingDanItem{
		margin-right:20px;
	}
	.save{
	    padding: 15px;
	    text-align: right;
	    border-top: 1px solid #e5e5e5;
	}
	
	.btn-tijiao {
	    color: #fff;
	    background-color: #449d44;
	    border-color: #398439;
	}
	.btn-tijiao:hover{
		color: #fff;
	    background-color: #449d44;
	    border-color: #398439;
	}
 	.div-c-controlBtns {
		display:flex;
		justify-content:flex-end;
		margin-bottom:16px;
	}
		.modal-dialog {
		max-width: 1000px;
	}
	.div-c-controlBtns button + button {
		margin-left:8px;
	}
	.p-c-flexwrapper {
		display:flex;
		justify-content: center;
		align-items:center;
		margin-right:16px;
		margin-bottom:16px;
	}
	.p-c-flexwrapper > span {
		width:132px;
	}
	.p-c-flexwrapper > .form-control {
		width:150px;
	}
	#dailiSm .modal-body,#userSm .modal-body {
		padding:0 15px;
	} 
	.tanchuang-edit-title{
		color:red;
	}
	#dailiSm h2,#userSm h2{
		margin-top:0;
		margin-bottom: 10px;
	}
	
	#addAndEditModal .modal-body {
		display:flex;
		flex-wrap:wrap;
	}
	#addAndEditModal1 .modal-body {
		display:flex;
		flex-wrap:wrap;
	}
	.bootstrap-background {
	    color: #fff;
	    display: inline-block;
	    text-align: center;
	    white-space: nowrap;
	    vertical-align: middle;
	    border: 1px solid transparent;
	    padding: 5px 10px;
	    line-height: 1.5;
	    border-radius: 3px;
	    font-size: 12px;
	    cursor: default;	
	}
	.bootstrap-background.info {
		 background-color: #5bc0de;
   		 border-color: #46b8da;
	}
	.bootstrap-background.success {
		background-color: #5cb85c;
	    border-color: #4cae4c;
	}
	.bootstrap-background.all {
		background-color: rgb(65,139,202);
	    border-color: rgb(65,139,202);
	}	
	.img-c-smallPic {
		max-width:60px;
		max-height:60px;
		cursor: pointer;
	}		
	.pic-noticeText {
		display:none;
		margin: 0 16px;
	}
	.pic-noticeText.active {
		display:block;
	}
	.modal {
		overflow: auto!important;
	}
	#editor {
		width:100%;
	}
	.table>tbody>tr>td {
	vertical-align:middle;	
}
.dataTables_wrapper table td, .dataTables_wrapper table th {
	white-space: nowrap;
}
.dataTables_wrapper, .dataTables_wrapper table {
	overflow-x:auto;
	max-width:100%;
}
.dataTables_wrapper table {
	border-collapse: collapse!important;
}
table.dataTable thead th {
	border-bottom-color: #ddd!important;
}
*{margin: 0;padding: 0;font-size: 16px; }
.hidden-td {
	display:none;
}
.w-e-icon-upload2 {
	font-size:60px!important;
}
.hasmaxwidth-td {
  max-width:100px;
  white-space: nowrap;
  text-overflow:ellipsis;
  overflow: hidden;
  cursor: pointer;
  max-height:50px;
}
.butt-tijiao {
	color: #fff;
    background-color: #5cb85c;
    border-color: #4cae4c;
    display: inline-block;
    padding: 6px 12px;
    margin-bottom: 0;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.42857143;
    text-align: center;
    white-space: nowrap;
    vertical-align: middle;
    
     touch-action: manipulation;
    cursor: pointer;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    background-image: none;
    border: 1px solid transparent;
    border-radius: 4px;
}

	.btn-editBaiMingDanItem{
		margin-right:20px;
	}
	.save{
	    padding: 15px;
	    text-align: right;
	    border-top: 1px solid #e5e5e5;
	}
	
	.btn-tijiao {
	    color: #fff;
	    background-color: #449d44;
	    border-color: #398439;
	}
	.btn-tijiao:hover{
		color: #fff;
	    background-color: #449d44;
	    border-color: #398439;
	}
 	.div-c-controlBtns {
		display:flex;
		justify-content:flex-end;
		margin-bottom:16px;
	}
		.modal-dialog {
		max-width: 1000px;
	}
	.div-c-controlBtns button + button {
		margin-left:8px;
	}
	.p-c-flexwrapper {
		display:flex;
		justify-content: center;
		align-items:center;
		margin-right:16px;
		margin-bottom:16px;
	}
	.p-c-flexwrapper > span {
		width:132px;
	}
	.p-c-flexwrapper > .form-control {
		width:150px;
	}
	#addAndEditModal .modal-body {
		display:flex;
		flex-wrap:wrap;
	}
	#addAndEditModal1 .modal-body {
		display:flex;
		flex-wrap:wrap;
	}
	.bootstrap-background {
	    color: #fff;
	    display: inline-block;
	    text-align: center;
	    white-space: nowrap;
	    vertical-align: middle;
	    border: 1px solid transparent;
	    padding: 5px 10px;
	    line-height: 1.5;
	    border-radius: 3px;
	    font-size: 12px;
	    cursor: default;	
	}
	.bootstrap-background.info {
		 background-color: #5bc0de;
   		 border-color: #46b8da;
	}
	.bootstrap-background.success {
		background-color: #5cb85c;
	    border-color: #4cae4c;
	}
	.bootstrap-background.all {
		background-color: rgb(65,139,202);
	    border-color: rgb(65,139,202);
	}	
	.img-c-smallPic {
		max-width:60px;
		max-height:60px;
		cursor: pointer;
	}		
	.pic-noticeText {
		display:none;
		margin: 0 16px;
	}
	.pic-noticeText.active {
		display:block;
	}
	.modal {
		overflow: auto!important;
	}
	#editor {
		width:100%;
	}
	.table>tbody>tr>td {
	vertical-align:middle;	
}
.dataTables_wrapper table td, .dataTables_wrapper table th {
	white-space: nowrap;
}
.dataTables_wrapper, .dataTables_wrapper table {
	overflow-x:auto;
	max-width:100%;
}
.dataTables_wrapper table {
	border-collapse: collapse!important;
}
table.dataTable thead th {
	border-bottom-color: #ddd!important;
}
*{margin: 0;padding: 0;font-size: 16px; }
.hidden-td {
	display:none;
}
.w-e-icon-upload2 {
	font-size:60px!important;
}
.hasmaxwidth-td {
  max-width:100px;
  white-space: nowrap;
  text-overflow:ellipsis;
  overflow: hidden;
  cursor: pointer;
  max-height:50px;
}
.butt-tijiao {
	color: #fff;
    background-color: #5cb85c;
    border-color: #4cae4c;
    display: inline-block;
    padding: 6px 12px;
    margin-bottom: 0;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.42857143;
    text-align: center;
    white-space: nowrap;
    vertical-align: middle;
    
     touch-action: manipulation;
    cursor: pointer;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    background-image: none;
    border: 1px solid transparent;
    border-radius: 4px;
}
</style>
		<script type="text/javascript" src="/js/wangEditor.min.js"></script>
</head>
<body>
			<div id="dailiSm">
	            <div class="modal-body" >
	            	<h4 class="tanchuang-edit-title">用户代理中心说明编辑</h4>
	 				<div id="editor2">
		    		</div>            	
	            </div>
        	</div>
        	
        	<div id="userSm" style="margin-top:20px;">
	            <div class="modal-body" >
	            	<h4 class="tanchuang-edit-title">用户返水中心说明编辑</h4>
	 				<div id="editor3">
		    		</div>            	
	            </div>
	            <div class="modal-footer">	   
	            	<button type="button" class="btn btn-success btn-saveAlertContent">保存</button>   
	                <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
	            </div>
        	</div>
		
	<script type="text/javascript" src="/js/zhengzeTools.js"></script>
	<script>

	initEditor("#editor2")
	initEditor("#editor3")
			$.ajax({
				type:'post',
				url:'/admin/findSystemConfigure.do',
				success:function(data){
					$("#editor2 .w-e-text").html(data.data.fanshuiContent),
					$("#editor3 .w-e-text").html(data.data.fanshuiPicture) 
				}
			})
		
	 	$(".btn-saveAlertContent").on("click", function(e) {
			$.ajax({
				type:'post',
				url:'/agents/updateDailiRule.do',
				 data:{
					 "rule":$("#editor2 .w-e-text").html(),
					 "rules":$("#editor3 .w-e-text").html()
				 }, 
				success:function(data){
					alert("编辑成功！")  
				}
			}) 
		})
	</script>
</body>
</html>